import {baseUrl} from './axios'

export const imgFormat = (banners) => {
  return banners.map(item=>{
    item.url = bannerFormat(item.url)
    return item;
  })
}
export const bannerFormat = (banner) => {
  return banner.slice(0, 5) === 'https' ? banner : baseUrl + banner
}